package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 易耗品领用记录实体类
 */
@Data
@TableName("consumable_receive")
public class ConsumableReceive {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("laboratory_id")
    private Long laboratoryId;

    @TableField("receiver_id")
    private Long receiverId;

    @TableField("item_name")
    private String itemName;

    @TableField("specification")
    private String specification;

    @TableField("unit")
    private String unit;

    @TableField("quantity")
    private Integer quantity;

    @TableField("unit_price")
    private BigDecimal unitPrice;

    @TableField("total_amount")
    private BigDecimal totalAmount;

    @TableField("receive_date")
    private LocalDate receiveDate;

    @TableField("purpose")
    private String purpose;

    @TableField("is_planned")
    private Boolean isPlanned; // true-计划内, false-计划外

    @TableField("plan_id")
    private Long planId;

    @TableField("receiver_name")
    private String receiverName;

    @TableField("receiver_phone")
    private String receiverPhone;

    @TableField("approval_status")
    private String approvalStatus;

    @TableField("approver_id")
    private Long approverId;

    @TableField("approval_time")
    private LocalDateTime approvalTime;

    @TableField("approval_comment")
    private String approvalComment;

    @TableField("remark")
    private String remark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
